package de.karlNet.condition.conditions.lower;

import de.karlNet.condition.conditions.Condition;

public class LowerAnd<T extends Comparable<T>> extends Condition<T> {
	public LowerAnd(T[] actualValues, T[] valuesToBeExpected) {
		super(actualValues, valuesToBeExpected);
	}

	public LowerAnd(T... actualValues) {
		super(actualValues);
	}

	public boolean meets() {
		super.meets();
		for (int i = 0; i < actualValues.length; i++) {
			if (actualValues[i].compareTo(valuesToBeExpected[i]) < 1) {
				return false;
			}
		}
		return true;
	}

	public static <T extends Comparable<T>> LowerAnd<T> lowerAnd(T... actualValues) {
		return new LowerAnd<T>(actualValues);
	}
}
